#!/usr/bin/env python3
# -*- coding: utf-8 -*
# Time :2024-06-17 8:59
# @Author: baiping
from quote.base.usebrowser import UseBrowser
from quote.web_page.usermanager.login_page import LoginPage


class CustomerPage(LoginPage):

    # def __init__(self):
    #     pass


    def add_customer(self,customerNO='',customerName='',phone='',
                     address='',relationman='',otherInfo=''):
        self.change_window('报价管理系统')
        self.change_frame('Links')
        self.click_element('xpath','//*[@id="Bar_panel0_b0"]/img')
        self.change_frame('main')
        self.click_element('xpath', '/html/body/center/table[2]/tbody/tr[2]/td[2]/a')
        self.change_window('新增客户信息')
        self.input_text('name','customerNO',customerNO)
        self.input_text('name', 'customerName', customerName)
        self.input_text('name', 'phone', phone)
        self.input_text('name', 'address', address)
        self.input_text('name', 'relationman', relationman)
        self.input_text('name', 'otherInfo', otherInfo)
        self.click_element('name', 'saveButton')



